package com.dyh.service.comment;

import com.dyh.dao.CommentDao;
import com.dyh.pojo.Comment;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CommentServiceImpl implements CommentService{

    @Autowired
    private CommentDao commentDao;

    @Override
    public void addComment(Comment comment) {
        commentDao.addComment(comment);
    }

    @Override
    public void deleteComment(int id) {
        commentDao.deleteComment(id);
    }

    @Override
    public void updateComment(Comment comment) {
        commentDao.updateComment(comment);
    }

    @Override
    public List<Comment> queryCommentList() {
        return commentDao.queryCommentList();
    }

    @Override
    public Comment queryCommentById(int id) {
        return commentDao.queryCommentById(id);
    }
}
